/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package interfaz;

import com.toedter.calendar.JDateChooser;
import java.awt.Image;
import java.awt.Toolkit;
import javax.swing.*;
import negocio.ui.UILabPaez;

/**
 *
 * @author Kriathos
 */
public class FRLabPaez extends javax.swing.JFrame {

    private UILabPaez uiLabPaez = new UILabPaez();

    /**
     * Creates new form FRLabPaez
     */
    public FRLabPaez() {
        initComponents();
        setSize(660, 600);
        setLocationRelativeTo(this);
        
        Image icon = Toolkit.getDefaultToolkit().getImage(getClass().getResource("/interfaz/LabPaez.png")); setIconImage(icon);
        this.setIconImage(icon);
        
        uiLabPaez.cargarCombos(this);
        uiLabPaez.cargarTablasAlInicio(this);
    }

    public JButton getBtnAgregarAna() {
        return btnAgregarAna;
    }

    public void setBtnAgregarAna(JButton btnAgregarAna) {
        this.btnAgregarAna = btnAgregarAna;
    }

    public JButton getBtnAgregarPacientes() {
        return btnAgregarPacientes;
    }

    public void setBtnAgregarPacientes(JButton btnAgregarPacientes) {
        this.btnAgregarPacientes = btnAgregarPacientes;
    }

    public JButton getBtnAgregarTipo() {
        return btnAgregarTipo;
    }

    public void setBtnAgregarTipo(JButton btnAgregarTipo) {
        this.btnAgregarTipo = btnAgregarTipo;
    }

    public JButton getBtnModificarPacientes() {
        return btnModificarPacientes;
    }

    public void setBtnModificarPacientes(JButton btnModificarPacientes) {
        this.btnModificarPacientes = btnModificarPacientes;
    }

    public JButton getBtnVisualizarAna() {
        return btnVisualizarAna;
    }

    public void setBtnVisualizarAna(JButton btnVisualizarAna) {
        this.btnVisualizarAna = btnVisualizarAna;
    }

    public JButton getBtnVisualizarPacientes() {
        return btnVisualizarPacientes;
    }

    public void setBtnVisualizarPacientes(JButton btnVisualizarPacientes) {
        this.btnVisualizarPacientes = btnVisualizarPacientes;
    }

    public JComboBox getCbTipoExamenAna() {
        return cbTipoExamenAna;
    }

    public void setCbTipoExamenAna(JComboBox cbTipoExamenAna) {
        this.cbTipoExamenAna = cbTipoExamenAna;
    }

    public JComboBox getComboAnalitos1() {
        return comboAnalitos1;
    }

    public void setComboAnalitos1(JComboBox comboAnalitos1) {
        this.comboAnalitos1 = comboAnalitos1;
    }

    public JLabel getMsjAna() {
        return msjAna;
    }

    public void setMsjAna(JLabel msjAna) {
        this.msjAna = msjAna;
    }

    public JLabel getMsjExamen() {
        return msjExamen;
    }

    public void setMsjExamen(JLabel msjExamen) {
        this.msjExamen = msjExamen;
    }

    public JLabel getMsjTipoExamen() {
        return msjTipoExamen;
    }

    public void setMsjTipoExamen(JLabel msjTipoExamen) {
        this.msjTipoExamen = msjTipoExamen;
    }

    public JTable getTablaAna() {
        return tablaAna;
    }

    public void setTablaAna(JTable tablaAna) {
        this.tablaAna = tablaAna;
    }

    public JTable getTablaPacientes() {
        return tablaPacientes;
    }

    public void setTablaPacientes(JTable tablaPacientes) {
        this.tablaPacientes = tablaPacientes;
    }

    public JTable getTablaTipoExamen() {
        return tablaTipoExamen;
    }

    public void setTablaTipoExamen(JTable tablaTipoExamen) {
        this.tablaTipoExamen = tablaTipoExamen;
    }

    public JTextField getTxtApellido1() {
        return txtApellido1;
    }

    public void setTxtApellido1(JTextField txtApellido1) {
        this.txtApellido1 = txtApellido1;
    }

    public JTextField getTxtApellido2() {
        return txtApellido2;
    }

    public void setTxtApellido2(JTextField txtApellido2) {
        this.txtApellido2 = txtApellido2;
    }

    public JTextField getTxtCorreo() {
        return txtCorreo;
    }

    public void setTxtCorreo(JTextField txtCorreo) {
        this.txtCorreo = txtCorreo;
    }

    public JTextField getTxtEdad() {
        return txtEdad;
    }

    public void setTxtEdad(JTextField txtEdad) {
        this.txtEdad = txtEdad;
    }

    public JTextField getTxtIdentificacion() {
        return txtIdentificacion;
    }

    public void setTxtIdentificacion(JTextField txtIdentificacion) {
        this.txtIdentificacion = txtIdentificacion;
    }

    public JTextField getTxtNombre() {
        return txtNombre;
    }

    public void setTxtNombre(JTextField txtNombre) {
        this.txtNombre = txtNombre;
    }

    public JTextField getTxtPorMax() {
        return txtPorMax;
    }

    public void setTxtPorMax(JTextField txtPorMax) {
        this.txtPorMax = txtPorMax;
    }

    public JTextField getTxtPorMin() {
        return txtPorMin;
    }

    public void setTxtPorMin(JTextField txtPorMin) {
        this.txtPorMin = txtPorMin;
    }

    public JTextField getTxtTelefono() {
        return txtTelefono;
    }

    public void setTxtTelefono(JTextField txtTelefono) {
        this.txtTelefono = txtTelefono;
    }

    public JTextField getTxtTipoExamen() {
        return txtTipoExamen;
    }

    public void setTxtTipoExamen(JTextField txtTipoExamen) {
        this.txtTipoExamen = txtTipoExamen;
    }

    public JTextField getTxtUnidad() {
        return txtUnidad;
    }

    public void setTxtUnidad(JTextField txtUnidad) {
        this.txtUnidad = txtUnidad;
    }

    public JTextField getTxtValorMax() {
        return txtValorMax;
    }

    public void setTxtValorMax(JTextField txtValorMax) {
        this.txtValorMax = txtValorMax;
    }

    public JTextField getTxtValorMin() {
        return txtValorMin;
    }

    public void setTxtValorMin(JTextField txtValorMin) {
        this.txtValorMin = txtValorMin;
    }

    public JButton getBtnAgregarAnalito() {
        return btnAgregarAnalito;
    }

    public void setBtnAgregarAnalito(JButton btnAgregarAnalito) {
        this.btnAgregarAnalito = btnAgregarAnalito;
    }

    public JButton getBtnAgregarExamen() {
        return btnAgregarExamen;
    }

    public void setBtnAgregarExamen(JButton btnAgregarExamen) {
        this.btnAgregarExamen = btnAgregarExamen;
    }

    public JComboBox getComboAnalitos() {
        return comboAnalitos;
    }

    public void setComboAnalitos(JComboBox comboAnalitos) {
        this.comboAnalitos = comboAnalitos;
    }

    public JComboBox getComboPacientes() {
        return comboPacientes;
    }

    public void setComboPacientes(JComboBox comboPacientes) {
        this.comboPacientes = comboPacientes;
    }

    public JComboBox getComboTipoExamen() {
        return comboTipoExamen;
    }

    public void setComboTipoExamen(JComboBox comboTipoExamen) {
        this.comboTipoExamen = comboTipoExamen;
    }

    public JTable getTblAnalitos() {
        return tblAnalitos;
    }

    public void setTblAnalitos(JTable tblAnalitos) {
        this.tblAnalitos = tblAnalitos;
    }

    public JTextArea getTxtAObservaciones() {
        return txtAObservaciones;
    }

    public void setTxtAObservaciones(JTextArea txtAObservaciones) {
        this.txtAObservaciones = txtAObservaciones;
    }

    public JTextArea getTxtARecomendaciones() {
        return txtARecomendaciones;
    }

    public void setTxtARecomendaciones(JTextArea txtARecomendaciones) {
        this.txtARecomendaciones = txtARecomendaciones;
    }

    public JTextField getTxtPorcentaje() {
        return txtPorcentaje;
    }

    public void setTxtPorcentaje(JTextField txtPorcentaje) {
        this.txtPorcentaje = txtPorcentaje;
    }

    public JTextField getTxtValor() {
        return txtValor;
    }

    public void setTxtValor(JTextField txtValor) {
        this.txtValor = txtValor;
    }

    public JButton getBtnAgregarTipoAna() {
        return btnAgregarTipoAna;
    }

    public void setBtnAgregarTipoAna(JButton btnAgregarTipoAna) {
        this.btnAgregarTipoAna = btnAgregarTipoAna;
    }

    public JLabel getMsjTipoAna() {
        return msjTipoAna;
    }

    public void setMsjTipoAna(JLabel msjTipoAna) {
        this.msjTipoAna = msjTipoAna;
    }

    public JTable getTablaTipoAna() {
        return tablaTipoAna;
    }

    public void setTablaTipoAna(JTable tablaTipoAna) {
        this.tablaTipoAna = tablaTipoAna;
    }

    public JTextField getTxtTipoAna() {
        return txtTipoAna;
    }

    public void setTxtTipoAna(JTextField txtTipoAna) {
        this.txtTipoAna = txtTipoAna;
    }

    public JDateChooser getDateChooser() {
        return dateChooser;
    }

    public void setDateChooser(JDateChooser dateChooser) {
        this.dateChooser = dateChooser;
    }

    public JTextField getTxtIdentificacionMod() {
        return txtIdentificacionMod;
    }

    public void setTxtIdentificacionMod(JTextField txtIdentificacionMod) {
        this.txtIdentificacionMod = txtIdentificacionMod;
    }

    public JButton getLimpiarPaciente() {
        return LimpiarPaciente;
    }

    public void setLimpiarPaciente(JButton LimpiarPaciente) {
        this.LimpiarPaciente = LimpiarPaciente;
    }

    public JComboBox getCbTipoExamenTipoAna() {
        return cbTipoExamenTipoAna;
    }

    public void setCbTipoExamenTipoAna(JComboBox cbTipoExamenAna1) {
        this.cbTipoExamenTipoAna = cbTipoExamenAna1;
    }

    public JButton getBtnEnviarCorreo() {
        return btnEnviarCorreo;
    }

    public void setBtnEnviarCorreo(JButton btnEnviarCorreo) {
        this.btnEnviarCorreo = btnEnviarCorreo;
    }

    public JComboBox getComboPacientes1() {
        return comboPacientes1;
    }

    public void setComboPacientes1(JComboBox comboPacientes1) {
        this.comboPacientes1 = comboPacientes1;
    }

    public JComboBox getComboTipoExamen1() {
        return comboTipoExamen1;
    }

    public void setComboTipoExamen1(JComboBox comboTipoExamen1) {
        this.comboTipoExamen1 = comboTipoExamen1;
    }

    public JTextField getFecha1() {
        return fecha1;
    }

    public void setFecha1(JTextField fecha1) {
        this.fecha1 = fecha1;
    }

    public JTable getTblAnalitos1() {
        return tblAnalitos1;
    }

    public void setTblAnalitos1(JTable tblAnalitos1) {
        this.tblAnalitos1 = tblAnalitos1;
    }

    public JTextArea getTxtAObservaciones1() {
        return txtAObservaciones1;
    }

    public void setTxtAObservaciones1(JTextArea txtAObservaciones1) {
        this.txtAObservaciones1 = txtAObservaciones1;
    }

    public JTextArea getTxtARecomendaciones1() {
        return txtARecomendaciones1;
    }

    public void setTxtARecomendaciones1(JTextArea txtARecomendaciones1) {
        this.txtARecomendaciones1 = txtARecomendaciones1;
    }

    public JComboBox getCbAnaGrafico() {
        return cbAnaGrafico;
    }

    public void setCbAnaGrafico(JComboBox cbAnaGrafico) {
        this.cbAnaGrafico = cbAnaGrafico;
    }

    public JTextField getTxtIDGrafico() {
        return txtIDGrafico;
    }

    public void setTxtIDGrafico(JTextField txtIDGrafico) {
        this.txtIDGrafico = txtIDGrafico;
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jpPrincipal = new javax.swing.JTabbedPane();
        jpPacientes = new javax.swing.JPanel();
        txtIdentificacion = new javax.swing.JTextField();
        txtNombre = new javax.swing.JTextField();
        txtTelefono = new javax.swing.JTextField();
        txtCorreo = new javax.swing.JTextField();
        txtApellido1 = new javax.swing.JTextField();
        txtApellido2 = new javax.swing.JTextField();
        txtEdad = new javax.swing.JTextField();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        btnAgregarPacientes = new javax.swing.JButton();
        btnModificarPacientes = new javax.swing.JButton();
        btnVisualizarPacientes = new javax.swing.JButton();
        jSeparator1 = new javax.swing.JSeparator();
        jScrollPane1 = new javax.swing.JScrollPane();
        tablaPacientes = new javax.swing.JTable();
        tituloPacientes = new javax.swing.JLabel();
        txtIdentificacionMod = new javax.swing.JTextField();
        jLabel7 = new javax.swing.JLabel();
        jSeparator7 = new javax.swing.JSeparator();
        LimpiarPaciente = new javax.swing.JButton();
        jpTipoExamen = new javax.swing.JPanel();
        txtTipoExamen = new javax.swing.JTextField();
        jLabel17 = new javax.swing.JLabel();
        btnAgregarTipo = new javax.swing.JButton();
        jSeparator3 = new javax.swing.JSeparator();
        jScrollPane3 = new javax.swing.JScrollPane();
        tablaTipoExamen = new javax.swing.JTable();
        tituloTipoExamen = new javax.swing.JLabel();
        msjTipoExamen = new javax.swing.JLabel();
        jpTipoAnalito = new javax.swing.JPanel();
        txtTipoAna = new javax.swing.JTextField();
        jLabel26 = new javax.swing.JLabel();
        btnAgregarTipoAna = new javax.swing.JButton();
        jSeparator6 = new javax.swing.JSeparator();
        jScrollPane7 = new javax.swing.JScrollPane();
        tablaTipoAna = new javax.swing.JTable();
        tituloTipoAna = new javax.swing.JLabel();
        msjTipoAna = new javax.swing.JLabel();
        cbTipoExamenTipoAna = new javax.swing.JComboBox();
        jLabel27 = new javax.swing.JLabel();
        jpAnalito = new javax.swing.JPanel();
        txtUnidad = new javax.swing.JTextField();
        txtValorMin = new javax.swing.JTextField();
        txtValorMax = new javax.swing.JTextField();
        txtPorMin = new javax.swing.JTextField();
        txtPorMax = new javax.swing.JTextField();
        jLabel10 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jLabel14 = new javax.swing.JLabel();
        jLabel15 = new javax.swing.JLabel();
        btnAgregarAna = new javax.swing.JButton();
        btnVisualizarAna = new javax.swing.JButton();
        jSeparator2 = new javax.swing.JSeparator();
        jScrollPane2 = new javax.swing.JScrollPane();
        tablaAna = new javax.swing.JTable();
        tituloAna = new javax.swing.JLabel();
        msjAna = new javax.swing.JLabel();
        jLabel16 = new javax.swing.JLabel();
        comboAnalitos1 = new javax.swing.JComboBox();
        cbTipoExamenAna = new javax.swing.JComboBox();
        jpExamen = new javax.swing.JPanel();
        jSeparator4 = new javax.swing.JSeparator();
        msjExamen = new javax.swing.JLabel();
        jLabel23 = new javax.swing.JLabel();
        comboPacientes = new javax.swing.JComboBox();
        jLabel19 = new javax.swing.JLabel();
        comboTipoExamen = new javax.swing.JComboBox();
        jLabel24 = new javax.swing.JLabel();
        jLabel20 = new javax.swing.JLabel();
        jScrollPane4 = new javax.swing.JScrollPane();
        txtARecomendaciones = new javax.swing.JTextArea();
        jScrollPane5 = new javax.swing.JScrollPane();
        txtAObservaciones = new javax.swing.JTextArea();
        jLabel22 = new javax.swing.JLabel();
        jLabel18 = new javax.swing.JLabel();
        comboAnalitos = new javax.swing.JComboBox();
        jSeparator5 = new javax.swing.JSeparator();
        jLabel25 = new javax.swing.JLabel();
        txtValor = new javax.swing.JTextField();
        jLabel21 = new javax.swing.JLabel();
        txtPorcentaje = new javax.swing.JTextField();
        btnAgregarAnalito = new javax.swing.JButton();
        jScrollPane6 = new javax.swing.JScrollPane();
        tblAnalitos = new javax.swing.JTable();
        btnAgregarExamen = new javax.swing.JButton();
        tituloAna1 = new javax.swing.JLabel();
        dateChooser = new com.toedter.calendar.JDateChooser();
        jpCorreo = new javax.swing.JPanel();
        jSeparator8 = new javax.swing.JSeparator();
        tituloCorreo = new javax.swing.JLabel();
        jLabel28 = new javax.swing.JLabel();
        comboPacientes1 = new javax.swing.JComboBox();
        jLabel29 = new javax.swing.JLabel();
        comboTipoExamen1 = new javax.swing.JComboBox();
        jLabel30 = new javax.swing.JLabel();
        jScrollPane8 = new javax.swing.JScrollPane();
        txtAObservaciones1 = new javax.swing.JTextArea();
        jScrollPane9 = new javax.swing.JScrollPane();
        txtARecomendaciones1 = new javax.swing.JTextArea();
        jLabel31 = new javax.swing.JLabel();
        jLabel32 = new javax.swing.JLabel();
        fecha1 = new javax.swing.JTextField();
        jScrollPane10 = new javax.swing.JScrollPane();
        tblAnalitos1 = new javax.swing.JTable();
        btnEnviarCorreo = new javax.swing.JButton();
        jPanel1 = new javax.swing.JPanel();
        jSeparator9 = new javax.swing.JSeparator();
        tituloTipoAna1 = new javax.swing.JLabel();
        txtIDGrafico = new javax.swing.JTextField();
        jLabel9 = new javax.swing.JLabel();
        btnBuscarGrafico = new javax.swing.JButton();
        cbAnaGrafico = new javax.swing.JComboBox();
        jLabel33 = new javax.swing.JLabel();
        btnGenerarGrafico = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Sistema de Control y Reporte del Laboratorio Páez");
        setPreferredSize(new java.awt.Dimension(660, 530));
        getContentPane().setLayout(null);

        jpPacientes.setLayout(null);
        jpPacientes.add(txtIdentificacion);
        txtIdentificacion.setBounds(320, 50, 90, 30);
        jpPacientes.add(txtNombre);
        txtNombre.setBounds(110, 50, 90, 30);
        jpPacientes.add(txtTelefono);
        txtTelefono.setBounds(490, 90, 90, 30);
        jpPacientes.add(txtCorreo);
        txtCorreo.setBounds(110, 130, 300, 30);
        jpPacientes.add(txtApellido1);
        txtApellido1.setBounds(110, 90, 90, 30);
        jpPacientes.add(txtApellido2);
        txtApellido2.setBounds(320, 90, 90, 30);
        jpPacientes.add(txtEdad);
        txtEdad.setBounds(490, 50, 90, 30);

        jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabel1.setText("Segundo Apellido");
        jpPacientes.add(jLabel1);
        jLabel1.setBounds(190, 90, 120, 30);

        jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabel2.setText("Primer Apellido");
        jpPacientes.add(jLabel2);
        jLabel2.setBounds(10, 90, 90, 30);

        jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabel3.setText("Nombre");
        jpPacientes.add(jLabel3);
        jLabel3.setBounds(10, 50, 90, 30);

        jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabel4.setText("Identificacion");
        jpPacientes.add(jLabel4);
        jLabel4.setBounds(230, 50, 80, 30);

        jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabel5.setText("Telefono");
        jpPacientes.add(jLabel5);
        jLabel5.setBounds(400, 90, 80, 30);

        jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabel6.setText("Correo");
        jpPacientes.add(jLabel6);
        jLabel6.setBounds(20, 130, 80, 30);

        jLabel8.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabel8.setText("Edad");
        jpPacientes.add(jLabel8);
        jLabel8.setBounds(400, 50, 80, 30);

        btnAgregarPacientes.setText("Agregar");
        btnAgregarPacientes.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAgregarPacientesActionPerformed(evt);
            }
        });
        jpPacientes.add(btnAgregarPacientes);
        btnAgregarPacientes.setBounds(490, 130, 90, 23);

        btnModificarPacientes.setText("Modificar");
        btnModificarPacientes.setToolTipText("Se realiza la modificacion en base a una identificacion del usuario");
        btnModificarPacientes.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnModificarPacientesActionPerformed(evt);
            }
        });
        jpPacientes.add(btnModificarPacientes);
        btnModificarPacientes.setBounds(300, 200, 90, 23);

        btnVisualizarPacientes.setText("Buscar");
        btnVisualizarPacientes.setToolTipText("Se realiza la visualizacion en base a una identificacion del usuario");
        btnVisualizarPacientes.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnVisualizarPacientesActionPerformed(evt);
            }
        });
        jpPacientes.add(btnVisualizarPacientes);
        btnVisualizarPacientes.setBounds(400, 200, 90, 23);
        jpPacientes.add(jSeparator1);
        jSeparator1.setBounds(10, 180, 580, 23);

        tablaPacientes.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Nombre", "P. Apellido", "S. Apellido", "Identificacion", "Edad", "Telefono", "Correo"
            }
        ));
        tablaPacientes.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        tablaPacientes.setEnabled(false);
        jScrollPane1.setViewportView(tablaPacientes);

        jpPacientes.add(jScrollPane1);
        jScrollPane1.setBounds(20, 250, 560, 180);

        tituloPacientes.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        tituloPacientes.setText("DATOS DE PACIENTES");
        jpPacientes.add(tituloPacientes);
        tituloPacientes.setBounds(20, 10, 560, 14);
        jpPacientes.add(txtIdentificacionMod);
        txtIdentificacionMod.setBounds(190, 200, 90, 30);

        jLabel7.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabel7.setText("Identificacion");
        jpPacientes.add(jLabel7);
        jLabel7.setBounds(80, 200, 100, 30);
        jpPacientes.add(jSeparator7);
        jSeparator7.setBounds(10, 30, 580, 23);

        LimpiarPaciente.setText("Limpiar Campos");
        LimpiarPaciente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                LimpiarPacienteActionPerformed(evt);
            }
        });
        jpPacientes.add(LimpiarPaciente);
        LimpiarPaciente.setBounds(230, 440, 160, 23);

        jpPrincipal.addTab("Pacientes", jpPacientes);

        jpTipoExamen.setLayout(null);
        jpTipoExamen.add(txtTipoExamen);
        txtTipoExamen.setBounds(130, 60, 270, 30);

        jLabel17.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabel17.setText("Nombre");
        jpTipoExamen.add(jLabel17);
        jLabel17.setBounds(50, 60, 70, 30);

        btnAgregarTipo.setText("Agregar");
        btnAgregarTipo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAgregarTipoActionPerformed(evt);
            }
        });
        jpTipoExamen.add(btnAgregarTipo);
        btnAgregarTipo.setBounds(410, 60, 100, 23);
        jpTipoExamen.add(jSeparator3);
        jSeparator3.setBounds(10, 30, 580, 20);

        tablaTipoExamen.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Nombre"
            }
        ));
        tablaTipoExamen.setEnabled(false);
        jScrollPane3.setViewportView(tablaTipoExamen);

        jpTipoExamen.add(jScrollPane3);
        jScrollPane3.setBounds(20, 100, 561, 330);

        tituloTipoExamen.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        tituloTipoExamen.setText("EXAMEN");
        jpTipoExamen.add(tituloTipoExamen);
        tituloTipoExamen.setBounds(20, 10, 560, 14);

        msjTipoExamen.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jpTipoExamen.add(msjTipoExamen);
        msjTipoExamen.setBounds(140, 440, 300, 20);

        jpPrincipal.addTab("Tipo de Examen", jpTipoExamen);

        jpTipoAnalito.setLayout(null);
        jpTipoAnalito.add(txtTipoAna);
        txtTipoAna.setBounds(130, 100, 270, 30);

        jLabel26.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabel26.setText("Nombre");
        jpTipoAnalito.add(jLabel26);
        jLabel26.setBounds(50, 100, 70, 30);

        btnAgregarTipoAna.setText("Agregar");
        btnAgregarTipoAna.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAgregarTipoAnaActionPerformed(evt);
            }
        });
        jpTipoAnalito.add(btnAgregarTipoAna);
        btnAgregarTipoAna.setBounds(410, 100, 100, 23);
        jpTipoAnalito.add(jSeparator6);
        jSeparator6.setBounds(10, 30, 580, 20);

        tablaTipoAna.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Nombre"
            }
        ));
        tablaTipoAna.setEnabled(false);
        jScrollPane7.setViewportView(tablaTipoAna);

        jpTipoAnalito.add(jScrollPane7);
        jScrollPane7.setBounds(20, 140, 561, 290);

        tituloTipoAna.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        tituloTipoAna.setText("ANALITOS");
        jpTipoAnalito.add(tituloTipoAna);
        tituloTipoAna.setBounds(20, 10, 560, 14);

        msjTipoAna.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jpTipoAnalito.add(msjTipoAna);
        msjTipoAna.setBounds(140, 440, 300, 20);

        jpTipoAnalito.add(cbTipoExamenTipoAna);
        cbTipoExamenTipoAna.setBounds(260, 60, 140, 30);

        jLabel27.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabel27.setText("Examen");
        jpTipoAnalito.add(jLabel27);
        jLabel27.setBounds(120, 60, 130, 30);

        jpPrincipal.addTab("Tipo de Analito", jpTipoAnalito);

        jpAnalito.setLayout(null);
        jpAnalito.add(txtUnidad);
        txtUnidad.setBounds(210, 140, 90, 30);
        jpAnalito.add(txtValorMin);
        txtValorMin.setBounds(400, 60, 70, 30);
        jpAnalito.add(txtValorMax);
        txtValorMax.setBounds(400, 100, 70, 30);
        jpAnalito.add(txtPorMin);
        txtPorMin.setBounds(400, 140, 70, 30);
        jpAnalito.add(txtPorMax);
        txtPorMax.setBounds(400, 180, 70, 30);

        jLabel10.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabel10.setText("Examen");
        jpAnalito.add(jLabel10);
        jLabel10.setBounds(20, 60, 130, 30);

        jLabel11.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabel11.setText("Unidad");
        jpAnalito.add(jLabel11);
        jLabel11.setBounds(130, 140, 70, 30);

        jLabel12.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabel12.setText("Valor Min.");
        jpAnalito.add(jLabel12);
        jLabel12.setBounds(320, 60, 70, 30);

        jLabel13.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabel13.setText("Valor Max.");
        jpAnalito.add(jLabel13);
        jLabel13.setBounds(320, 100, 70, 30);

        jLabel14.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabel14.setText("% Min.");
        jpAnalito.add(jLabel14);
        jLabel14.setBounds(320, 140, 70, 30);

        jLabel15.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabel15.setText("% Max.");
        jpAnalito.add(jLabel15);
        jLabel15.setBounds(320, 180, 70, 30);

        btnAgregarAna.setText("Agregar");
        btnAgregarAna.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAgregarAnaActionPerformed(evt);
            }
        });
        jpAnalito.add(btnAgregarAna);
        btnAgregarAna.setBounds(90, 200, 100, 23);

        btnVisualizarAna.setText("Buscar");
        btnVisualizarAna.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnVisualizarAnaActionPerformed(evt);
            }
        });
        jpAnalito.add(btnVisualizarAna);
        btnVisualizarAna.setBounds(200, 200, 100, 23);
        jpAnalito.add(jSeparator2);
        jSeparator2.setBounds(10, 30, 580, 20);

        tablaAna.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "ID", "Examen", "Analito", "Unidad", "Valor Min", "Valor Max", "% Min", "% Max"
            }
        ));
        tablaAna.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        jScrollPane2.setViewportView(tablaAna);
        tablaAna.getColumnModel().getColumn(2).setHeaderValue("Nombre");
        tablaAna.getColumnModel().getColumn(3).setHeaderValue("Unidad");
        tablaAna.getColumnModel().getColumn(4).setHeaderValue("Min");
        tablaAna.getColumnModel().getColumn(5).setHeaderValue("Max");
        tablaAna.getColumnModel().getColumn(6).setHeaderValue("% Min");
        tablaAna.getColumnModel().getColumn(7).setHeaderValue("% Max");

        jpAnalito.add(jScrollPane2);
        jScrollPane2.setBounds(20, 250, 561, 180);

        tituloAna.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        tituloAna.setText("ANALITOS EN EXAMEN");
        jpAnalito.add(tituloAna);
        tituloAna.setBounds(20, 10, 560, 14);

        msjAna.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jpAnalito.add(msjAna);
        msjAna.setBounds(140, 440, 300, 20);

        jLabel16.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabel16.setText("Analito");
        jpAnalito.add(jLabel16);
        jLabel16.setBounds(20, 100, 130, 30);
        jpAnalito.add(comboAnalitos1);
        comboAnalitos1.setBounds(160, 100, 140, 30);

        cbTipoExamenAna.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cbTipoExamenAnaActionPerformed(evt);
            }
        });
        jpAnalito.add(cbTipoExamenAna);
        cbTipoExamenAna.setBounds(160, 60, 140, 30);

        jpPrincipal.addTab("Analito", jpAnalito);

        jpExamen.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
        jpExamen.add(jSeparator4, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 30, 580, 20));

        msjExamen.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jpExamen.add(msjExamen, new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 440, 300, 20));

        jLabel23.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabel23.setText("Pacientes");
        jpExamen.add(jLabel23, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 40, 80, 30));

        jpExamen.add(comboPacientes, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 40, 300, 30));

        jLabel19.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabel19.setText("Tipo Examen");
        jpExamen.add(jLabel19, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 80, 80, 30));

        comboTipoExamen.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                comboTipoExamenActionPerformed(evt);
            }
        });
        jpExamen.add(comboTipoExamen, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 80, 300, 30));

        jLabel24.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabel24.setText("Fecha");
        jpExamen.add(jLabel24, new org.netbeans.lib.awtextra.AbsoluteConstraints(410, 40, 40, 30));

        jLabel20.setText("Recomendaciones Medicas");
        jpExamen.add(jLabel20, new org.netbeans.lib.awtextra.AbsoluteConstraints(330, 120, -1, 20));

        txtARecomendaciones.setColumns(20);
        txtARecomendaciones.setRows(5);
        jScrollPane4.setViewportView(txtARecomendaciones);

        jpExamen.add(jScrollPane4, new org.netbeans.lib.awtextra.AbsoluteConstraints(330, 140, 250, -1));

        txtAObservaciones.setColumns(20);
        txtAObservaciones.setRows(5);
        jScrollPane5.setViewportView(txtAObservaciones);

        jpExamen.add(jScrollPane5, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 140, 260, -1));

        jLabel22.setText("Observaciones");
        jpExamen.add(jLabel22, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 120, -1, 20));

        jLabel18.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabel18.setText("Analitos");
        jpExamen.add(jLabel18, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 260, 50, 30));
        jpExamen.add(comboAnalitos, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 260, 120, 30));
        jpExamen.add(jSeparator5, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 250, 580, 10));

        jLabel25.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabel25.setText("Valor");
        jpExamen.add(jLabel25, new org.netbeans.lib.awtextra.AbsoluteConstraints(230, 260, 40, 30));
        jpExamen.add(txtValor, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 260, 40, 30));

        jLabel21.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabel21.setText("Porcentaje");
        jpExamen.add(jLabel21, new org.netbeans.lib.awtextra.AbsoluteConstraints(330, 260, 70, 30));
        jpExamen.add(txtPorcentaje, new org.netbeans.lib.awtextra.AbsoluteConstraints(410, 260, 40, 30));

        btnAgregarAnalito.setText("Agregar Analito");
        btnAgregarAnalito.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAgregarAnalitoActionPerformed(evt);
            }
        });
        jpExamen.add(btnAgregarAnalito, new org.netbeans.lib.awtextra.AbsoluteConstraints(470, 260, -1, -1));

        tblAnalitos.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Analito", "Valor", "Porcentaje"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.Double.class, java.lang.Double.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        tblAnalitos.setEnabled(false);
        jScrollPane6.setViewportView(tblAnalitos);

        jpExamen.add(jScrollPane6, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 300, 580, 120));

        btnAgregarExamen.setText("Agregar Examen");
        btnAgregarExamen.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAgregarExamenActionPerformed(evt);
            }
        });
        jpExamen.add(btnAgregarExamen, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 430, -1, -1));

        tituloAna1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        tituloAna1.setText("RESULTADOS DEL EXAMEN");
        jpExamen.add(tituloAna1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 10, 580, -1));
        jpExamen.add(dateChooser, new org.netbeans.lib.awtextra.AbsoluteConstraints(460, 40, 130, 30));

        jpPrincipal.addTab("Examen", jpExamen);

        jpCorreo.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
        jpCorreo.add(jSeparator8, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 30, 580, 20));

        tituloCorreo.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        tituloCorreo.setText("CONSULTA DE EXAMENES");
        jpCorreo.add(tituloCorreo, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 10, 560, -1));

        jLabel28.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabel28.setText("Pacientes");
        jpCorreo.add(jLabel28, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 40, 80, 30));

        comboPacientes1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                comboPacientes1ActionPerformed(evt);
            }
        });
        jpCorreo.add(comboPacientes1, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 40, 300, 30));

        jLabel29.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabel29.setText("Lista Examenes");
        jpCorreo.add(jLabel29, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 80, 100, 30));

        comboTipoExamen1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                comboTipoExamen1ActionPerformed(evt);
            }
        });
        jpCorreo.add(comboTipoExamen1, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 80, 300, 30));

        jLabel30.setText("Observaciones");
        jpCorreo.add(jLabel30, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 120, -1, 20));

        txtAObservaciones1.setColumns(20);
        txtAObservaciones1.setEditable(false);
        txtAObservaciones1.setRows(5);
        jScrollPane8.setViewportView(txtAObservaciones1);

        jpCorreo.add(jScrollPane8, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 140, 260, -1));

        txtARecomendaciones1.setColumns(20);
        txtARecomendaciones1.setEditable(false);
        txtARecomendaciones1.setRows(5);
        jScrollPane9.setViewportView(txtARecomendaciones1);

        jpCorreo.add(jScrollPane9, new org.netbeans.lib.awtextra.AbsoluteConstraints(330, 140, 250, -1));

        jLabel31.setText("Recomendaciones Medicas");
        jpCorreo.add(jLabel31, new org.netbeans.lib.awtextra.AbsoluteConstraints(330, 120, -1, 20));

        jLabel32.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabel32.setText("Fecha");
        jpCorreo.add(jLabel32, new org.netbeans.lib.awtextra.AbsoluteConstraints(420, 40, 40, 30));

        fecha1.setEditable(false);
        jpCorreo.add(fecha1, new org.netbeans.lib.awtextra.AbsoluteConstraints(470, 40, 110, 30));

        tblAnalitos1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Analito", "Valor", "Porcentaje", "Valor Minimo", "Valor Maximo", "% Minimo", "% Maximo"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                true, true, true, false, true, true, true
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        tblAnalitos1.setEnabled(false);
        jScrollPane10.setViewportView(tblAnalitos1);

        jpCorreo.add(jScrollPane10, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 250, 580, 160));

        btnEnviarCorreo.setText("Enviar Correo al Paciente");
        btnEnviarCorreo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEnviarCorreoActionPerformed(evt);
            }
        });
        jpCorreo.add(btnEnviarCorreo, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 430, -1, -1));

        jpPrincipal.addTab("Consulta de Exámenes", jpCorreo);

        jPanel1.setLayout(null);
        jPanel1.add(jSeparator9);
        jSeparator9.setBounds(10, 30, 580, 20);

        tituloTipoAna1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        tituloTipoAna1.setText("GENERAR GRAFICO DE HISTORIAL");
        jPanel1.add(tituloTipoAna1);
        tituloTipoAna1.setBounds(20, 10, 560, 14);
        jPanel1.add(txtIDGrafico);
        txtIDGrafico.setBounds(180, 50, 210, 30);

        jLabel9.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabel9.setText("Analito");
        jPanel1.add(jLabel9);
        jLabel9.setBounds(80, 90, 90, 30);

        btnBuscarGrafico.setText("Buscar");
        btnBuscarGrafico.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBuscarGraficoActionPerformed(evt);
            }
        });
        jPanel1.add(btnBuscarGrafico);
        btnBuscarGrafico.setBounds(400, 50, 110, 30);

        jPanel1.add(cbAnaGrafico);
        cbAnaGrafico.setBounds(186, 90, 200, 30);

        jLabel33.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabel33.setText("Identificación");
        jPanel1.add(jLabel33);
        jLabel33.setBounds(80, 50, 90, 30);

        btnGenerarGrafico.setText("Generar");
        btnGenerarGrafico.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnGenerarGraficoActionPerformed(evt);
            }
        });
        jPanel1.add(btnGenerarGrafico);
        btnGenerarGrafico.setBounds(230, 140, 110, 30);

        jpPrincipal.addTab("Gráficos", jPanel1);

        getContentPane().add(jpPrincipal);
        jpPrincipal.setBounds(10, 10, 640, 560);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnAgregarAnaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAgregarAnaActionPerformed
        uiLabPaez.insertarAnalitoEnExamen(this);
        uiLabPaez.cargarCombos(this);
    }//GEN-LAST:event_btnAgregarAnaActionPerformed

    private void btnAgregarTipoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAgregarTipoActionPerformed
        uiLabPaez.insertarTipoExamen(this);
        uiLabPaez.cargarCombos(this);
    }//GEN-LAST:event_btnAgregarTipoActionPerformed

    private void btnAgregarAnalitoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAgregarAnalitoActionPerformed
        uiLabPaez.agregarAListaTempAnalitos(this);
        uiLabPaez.cargarCombos2(this);
    }//GEN-LAST:event_btnAgregarAnalitoActionPerformed

    private void btnAgregarTipoAnaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAgregarTipoAnaActionPerformed
        uiLabPaez.insertarTipoAnalito(this);
        uiLabPaez.cargarCombos(this);
    }//GEN-LAST:event_btnAgregarTipoAnaActionPerformed

    private void btnVisualizarAnaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnVisualizarAnaActionPerformed
        uiLabPaez.visualizarAnalitoEnExamen(this.getCbTipoExamenAna().getSelectedItem());
    }//GEN-LAST:event_btnVisualizarAnaActionPerformed

    private void btnAgregarExamenActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAgregarExamenActionPerformed
        uiLabPaez.agregarExamen(this);
        uiLabPaez.cargarCombos(this);
    }//GEN-LAST:event_btnAgregarExamenActionPerformed

    private void btnAgregarPacientesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAgregarPacientesActionPerformed
        uiLabPaez.insertarPacientes(this);
        uiLabPaez.cargarCombos(this);
    }//GEN-LAST:event_btnAgregarPacientesActionPerformed

    private void btnModificarPacientesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnModificarPacientesActionPerformed
        uiLabPaez.modificarPacientes(this);
        uiLabPaez.cargarCombos(this);
    }//GEN-LAST:event_btnModificarPacientesActionPerformed

    private void btnVisualizarPacientesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnVisualizarPacientesActionPerformed
        uiLabPaez.visualizarPacientes(this);
    }//GEN-LAST:event_btnVisualizarPacientesActionPerformed

    private void LimpiarPacienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_LimpiarPacienteActionPerformed
        uiLabPaez.limpiarPaciente(this);
    }//GEN-LAST:event_LimpiarPacienteActionPerformed

    private void comboTipoExamenActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_comboTipoExamenActionPerformed
        if (getComboTipoExamen().getSelectedIndex() > 0) {
            uiLabPaez.cargarComboAnalitosFiltrado(this);
        } else {
            getComboAnalitos().removeAllItems();
        }
    }//GEN-LAST:event_comboTipoExamenActionPerformed

    private void cbTipoExamenAnaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbTipoExamenAnaActionPerformed
        if (getCbTipoExamenAna().getSelectedIndex() > 0) {
            uiLabPaez.cargarComboAnalitosFiltradoTEx(this);
        } else {
            getComboAnalitos1().removeAllItems();
        }
    }//GEN-LAST:event_cbTipoExamenAnaActionPerformed

    private void comboPacientes1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_comboPacientes1ActionPerformed
        if (getComboPacientes1().getSelectedIndex() > 0) {
            getTblAnalitos1().removeAll();
            uiLabPaez.cargarComboExamenesPacientes(this);
        } else {
            getComboTipoExamen1().removeAllItems();
        }
    }//GEN-LAST:event_comboPacientes1ActionPerformed

    private void comboTipoExamen1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_comboTipoExamen1ActionPerformed
        if (getComboTipoExamen1().getSelectedIndex() > 0) {
            uiLabPaez.cargarDatosExamen(this);
        }
    }//GEN-LAST:event_comboTipoExamen1ActionPerformed

    private void btnEnviarCorreoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEnviarCorreoActionPerformed
        uiLabPaez.enviarCorreo();
    }//GEN-LAST:event_btnEnviarCorreoActionPerformed

    private void btnBuscarGraficoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBuscarGraficoActionPerformed
        uiLabPaez.buscarGrafico(this);
    }//GEN-LAST:event_btnBuscarGraficoActionPerformed

    private void btnGenerarGraficoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGenerarGraficoActionPerformed
        uiLabPaez.generarGrafico(this);
    }//GEN-LAST:event_btnGenerarGraficoActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /*
         * Set the Nimbus look and feel
         */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /*
         * If Nimbus (introduced in Java SE 6) is not available, stay with the
         * default look and feel. For details see
         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(FRLabPaez.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(FRLabPaez.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(FRLabPaez.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(FRLabPaez.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /*
         * Create and display the form
         */
        java.awt.EventQueue.invokeLater(new Runnable() {

            @Override
            public void run() {
                new FRLabPaez().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton LimpiarPaciente;
    private javax.swing.JButton btnAgregarAna;
    private javax.swing.JButton btnAgregarAnalito;
    private javax.swing.JButton btnAgregarExamen;
    private javax.swing.JButton btnAgregarPacientes;
    private javax.swing.JButton btnAgregarTipo;
    private javax.swing.JButton btnAgregarTipoAna;
    private javax.swing.JButton btnBuscarGrafico;
    private javax.swing.JButton btnEnviarCorreo;
    private javax.swing.JButton btnGenerarGrafico;
    private javax.swing.JButton btnModificarPacientes;
    private javax.swing.JButton btnVisualizarAna;
    private javax.swing.JButton btnVisualizarPacientes;
    private javax.swing.JComboBox cbAnaGrafico;
    private javax.swing.JComboBox cbTipoExamenAna;
    private javax.swing.JComboBox cbTipoExamenTipoAna;
    private javax.swing.JComboBox comboAnalitos;
    private javax.swing.JComboBox comboAnalitos1;
    private javax.swing.JComboBox comboPacientes;
    private javax.swing.JComboBox comboPacientes1;
    private javax.swing.JComboBox comboTipoExamen;
    private javax.swing.JComboBox comboTipoExamen1;
    private com.toedter.calendar.JDateChooser dateChooser;
    private javax.swing.JTextField fecha1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel31;
    private javax.swing.JLabel jLabel32;
    private javax.swing.JLabel jLabel33;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane10;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JScrollPane jScrollPane6;
    private javax.swing.JScrollPane jScrollPane7;
    private javax.swing.JScrollPane jScrollPane8;
    private javax.swing.JScrollPane jScrollPane9;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JSeparator jSeparator2;
    private javax.swing.JSeparator jSeparator3;
    private javax.swing.JSeparator jSeparator4;
    private javax.swing.JSeparator jSeparator5;
    private javax.swing.JSeparator jSeparator6;
    private javax.swing.JSeparator jSeparator7;
    private javax.swing.JSeparator jSeparator8;
    private javax.swing.JSeparator jSeparator9;
    private javax.swing.JPanel jpAnalito;
    private javax.swing.JPanel jpCorreo;
    private javax.swing.JPanel jpExamen;
    private javax.swing.JPanel jpPacientes;
    private javax.swing.JTabbedPane jpPrincipal;
    private javax.swing.JPanel jpTipoAnalito;
    private javax.swing.JPanel jpTipoExamen;
    private javax.swing.JLabel msjAna;
    private javax.swing.JLabel msjExamen;
    private javax.swing.JLabel msjTipoAna;
    private javax.swing.JLabel msjTipoExamen;
    private javax.swing.JTable tablaAna;
    private javax.swing.JTable tablaPacientes;
    private javax.swing.JTable tablaTipoAna;
    private javax.swing.JTable tablaTipoExamen;
    private javax.swing.JTable tblAnalitos;
    private javax.swing.JTable tblAnalitos1;
    private javax.swing.JLabel tituloAna;
    private javax.swing.JLabel tituloAna1;
    private javax.swing.JLabel tituloCorreo;
    private javax.swing.JLabel tituloPacientes;
    private javax.swing.JLabel tituloTipoAna;
    private javax.swing.JLabel tituloTipoAna1;
    private javax.swing.JLabel tituloTipoExamen;
    private javax.swing.JTextArea txtAObservaciones;
    private javax.swing.JTextArea txtAObservaciones1;
    private javax.swing.JTextArea txtARecomendaciones;
    private javax.swing.JTextArea txtARecomendaciones1;
    private javax.swing.JTextField txtApellido1;
    private javax.swing.JTextField txtApellido2;
    private javax.swing.JTextField txtCorreo;
    private javax.swing.JTextField txtEdad;
    private javax.swing.JTextField txtIDGrafico;
    private javax.swing.JTextField txtIdentificacion;
    private javax.swing.JTextField txtIdentificacionMod;
    private javax.swing.JTextField txtNombre;
    private javax.swing.JTextField txtPorMax;
    private javax.swing.JTextField txtPorMin;
    private javax.swing.JTextField txtPorcentaje;
    private javax.swing.JTextField txtTelefono;
    private javax.swing.JTextField txtTipoAna;
    private javax.swing.JTextField txtTipoExamen;
    private javax.swing.JTextField txtUnidad;
    private javax.swing.JTextField txtValor;
    private javax.swing.JTextField txtValorMax;
    private javax.swing.JTextField txtValorMin;
    // End of variables declaration//GEN-END:variables
}
